<template>
	<view class="container">
		<view class="setup-list">
			<view class="setup-item flex-x-bet-y-center" v-for="(item, index) in setupList" :key="index" @tap="navTo(item.url)">
				<text>{{item.name}}</text>
				<image src="../../static/images/icon-open.png" mode="" class="icon-open"></image>
			</view>
			<view class="setup-item flex-x-bet-y-center">
				<text>平台客服</text>
				<text class="kefu" @tap="phone2Kefu">13333333333</text>
			</view>
		</view>
	</view>
</template>

<script>
	import { phoneCall } from '@/utils/uni-api.js'
	export default {
		data() {
			return {
				setupList: [{
						name: '用户协议',
						url: '/pages/other/richText?from=privacy'
					},
					{
						name: '隐私政策',
						url: '/pages/other/richText?from=service'
					}
				]
			};
		},
		methods:{
			phone2Kefu(){
				phoneCall(String(18642024397))
			}
		}
	}
</script>

<style lang="scss">
	.container{
		background-color: #F3F3F3;
	}
	
	.setup-list {
		padding-top: 1rpx;
		margin: 0 30rpx;

		.setup-item {
			height: 100rpx;
			background: #FFFFFF;
			border-radius: 26rpx;
			padding: 0 30rpx;
			font-size: 30rpx;
			font-weight: 500;
			color: #333333;
			margin-top: 30rpx;
			
			.kefu{
				color: $theme-color;
			}
		}
		
		.icon-open{
			width: 46rpx;
			height: 46rpx;
		}
	}
</style>